<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Administration/main.master"
    CodeFile="ProductAdd.aspx.cs" ValidateRequest="false" Inherits="Tathata.Web.Administration.Administration_ProductAdd" %>

<%@ Register TagPrefix="nopCommerce" TagName="NumericTextBox" Src="Modules/NumericTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="SimpleTextBox" Src="Modules/SimpleTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="DecimalTextBox" Src="Modules/DecimalTextBox.ascx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="c1" ContentPlaceHolderID="cph1" runat="Server">
    <div>
        <div class="demoarea">
            <ajaxToolkit:TabContainer runat="server" ID="ProductTabs" ActiveTabIndex="0">
                <ajaxToolkit:TabPanel runat="server" ID="pnlProductInfo" HeaderText="Product Info">
                    <ContentTemplate>
                        <table class="adminContent">
                            <tr>
                                <td class="adminTitle">
                                    Product name:
                                </td>
                                <td class="adminData">
                                    <nopCommerce:SimpleTextBox runat="server" CssClass="adminInput" ID="txtName" ErrorMessage="Name is required">
                                    </nopCommerce:SimpleTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Short description:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtShortDescription" runat="server" CssClass="adminInput" TextMode="MultiLine"
                                        Height="100"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Full description:
                                </td>
                                <td class="adminData">
                                    <FCKeditorV2:FCKeditor ID="txtFullDescription" runat="server" BasePath="~/fckeditor/"
                                        AutoDetectLanguage="false" Height="350" Width="800px">
                                    </FCKeditorV2:FCKeditor>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Admin comment:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtAdminComment" runat="server" CssClass="adminInput" TextMode="MultiLine"
                                        Height="100"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Product type:
                                </td>
                                <td class="adminData">
                                    <asp:DropDownList ID="ddlProductType" AutoPostBack="False" CssClass="adminInput"
                                        runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Template:
                                </td>
                                <td class="adminData">
                                    <asp:DropDownList ID="ddlTemplate" AutoPostBack="False" CssClass="adminInput" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Published:
                                </td>
                                <td class="adminData">
                                    <asp:CheckBox ID="cbPublished" runat="server" Checked="True"></asp:CheckBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Allow customer reviews:
                                </td>
                                <td class="adminData">
                                    <asp:CheckBox ID="cbAllowCustomerReviews" runat="server" Checked="True"></asp:CheckBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    SKU:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtSKU" runat="server" CssClass="adminInput"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Manufacturer part number:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtManufacturerPartNumber" CssClass="adminInput" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Is download:
                                </td>
                                <td class="adminData">
                                    <asp:CheckBox ID="cbIsDownload" runat="server" Checked="False"></asp:CheckBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Download file (only zip files):
                                </td>
                                <td class="adminData">
                                    <asp:FileUpload ID="fuProductVariantDownload" CssClass="adminInput" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Is ship enabled:
                                </td>
                                <td class="adminData">
                                    <asp:CheckBox ID="cbIsShipEnabled" runat="server" Checked="True"></asp:CheckBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Is free shipping:
                                </td>
                                <td class="adminData">
                                    <asp:CheckBox ID="cbIsFreeShipping" runat="server" Checked="False"></asp:CheckBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Tax category:
                                </td>
                                <td class="adminData">
                                    <asp:DropDownList ID="ddlTaxCategory" CssClass="adminInput" AutoPostBack="False"
                                        runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Stock quantity :
                                </td>
                                <td class="adminData">
                                    <nopCommerce:NumericTextBox runat="server" CssClass="adminInput" ID="txtStockQuantity"
                                        RequiredErrorMessage="Enter stock quantity" MinimumValue="0" MaximumValue="999999"
                                        Value="10000" RangeErrorMessage="The value must be from 0 to 999999"></nopCommerce:NumericTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Warehouse:
                                </td>
                                <td class="adminData">
                                    <asp:DropDownList ID="ddlWarehouse" CssClass="adminInput" AutoPostBack="False" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Disable buy button
                                </td>
                                <td class="adminData">
                                    <asp:CheckBox ID="cbDisableBuyButton" runat="server" Checked="False"></asp:CheckBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Requires text option:
                                </td>
                                <td class="adminData">
                                    <asp:CheckBox ID="cbRequiresTextOption" runat="server" Checked="False"></asp:CheckBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Text option prompt:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtTextOptionPrompt" CssClass="adminInput" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Price [<%=CurrencyManager.PrimaryStoreCurrency.CurrencyCode%>]:
                                </td>
                                <td class="adminData">
                                    <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtPrice" Value="0"
                                        RequiredErrorMessage="Price is required" MinimumValue="0" MaximumValue="999999"
                                        RangeErrorMessage="The value must be from 0 to 999999"></nopCommerce:DecimalTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Old price [<%=CurrencyManager.PrimaryStoreCurrency.CurrencyCode%>]:
                                </td>
                                <td class="adminData">
                                    <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtOldPrice"
                                        Value="0" RequiredErrorMessage="Old price is required" MinimumValue="0" MaximumValue="999999"
                                        RangeErrorMessage="The value must be from 0 to 999999"></nopCommerce:DecimalTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Weight [<%=MeasureWeightManager.BaseWeightIn.Name%>]:
                                </td>
                                <td class="adminData">
                                    <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtWeight" Value="0"
                                        RequiredErrorMessage="Weight is required" MinimumValue="0" MaximumValue="999999"
                                        RangeErrorMessage="The value must be from 0 to 999999"></nopCommerce:DecimalTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Length [<%=MeasureDimensionManager.BaseDimensionIn.Name%>]:
                                </td>
                                <td class="adminData">
                                    <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtLength" Value="0"
                                        RequiredErrorMessage="Length is required" MinimumValue="0" MaximumValue="999999"
                                        RangeErrorMessage="The value must be from 0 to 999999"></nopCommerce:DecimalTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Width [<%=MeasureDimensionManager.BaseDimensionIn.Name%>]:
                                </td>
                                <td class="adminData">
                                    <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtWidth" Value="0"
                                        RequiredErrorMessage="Width is required" MinimumValue="0" MaximumValue="999999"
                                        RangeErrorMessage="The value must be from 0 to 999999"></nopCommerce:DecimalTextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Height [<%=MeasureDimensionManager.BaseDimensionIn.Name%>]:
                                </td>
                                <td class="adminData">
                                    <nopCommerce:DecimalTextBox runat="server" CssClass="adminInput" ID="txtHeight" Value="0"
                                        RequiredErrorMessage="Height is required" MinimumValue="0" MaximumValue="999999"
                                        RangeErrorMessage="The value must be from 0 to 999999"></nopCommerce:DecimalTextBox>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
                <ajaxToolkit:TabPanel runat="server" ID="pnlProductSEO" HeaderText="SEO">
                    <ContentTemplate>
                        <table class="adminContent">
                            <tr>
                                <td class="adminTitle">
                                    Meta keywords:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtMetaKeywords" CssClass="adminInput" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Meta description:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtMetaDescription" CssClass="adminInput" runat="server" TextMode="MultiLine"
                                        Height="100"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="adminTitle">
                                    Meta title:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtMetaTitle" CssClass="adminInput" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                            <tr runat="server" visible="false">
                                <td class="adminTitle">
                                    SE name:
                                </td>
                                <td class="adminData">
                                    <asp:TextBox ID="txtSEName" CssClass="adminInput" runat="server"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
                <ajaxToolkit:TabPanel runat="server" ID="pnlCategoryMappings" HeaderText="Category Mappings">
                    <ContentTemplate>
                        <table class="adminContent">
                            <tr>
                                <td colspan="2" width="100%">
                                    <asp:GridView ID="gvCategoryMappings" runat="server" AutoGenerateColumns="false"
                                        Width="100%">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Category" ItemStyle-Width="60%">
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="cbCategoryInfo" runat="server" Text=' <%#Server.HtmlEncode( Eval("CategoryInfo").ToString()) %>'
                                                        Checked='<%# Eval("IsMapped") %>' />
                                                    <asp:HiddenField ID="hfCategoryID" runat="server" Value='<%# Eval("CategoryID") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="View" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="13%"
                                                ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <a href='CategoryDetails.aspx?CategoryID=<%# Eval("CategoryID") %>'>View</a>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Featured Product" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="cbFeatured" runat="server" Checked="false" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Display order" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <nopCommerce:NumericTextBox runat="server" CssClass="adminInput" Width="50px" ID="txtDisplayOrder"
                                                        Value="1" RequiredErrorMessage="Display order is required" RangeErrorMessage="The value must be from -99999 to 99999"
                                                        MinimumValue="-99999" MaximumValue="99999"></nopCommerce:NumericTextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
                <ajaxToolkit:TabPanel runat="server" ID="pnlManufacturerMappings" HeaderText="Manufacturer Mappings">
                    <ContentTemplate>
                        <table class="adminContent">
                            <tr>
                                <td colspan="2" width="100%">
                                    <asp:GridView ID="gvManufacturerMappings" runat="server" AutoGenerateColumns="false"
                                        Width="100%">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Manufacturer" ItemStyle-Width="60%">
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="cbManufacturerInfo" runat="server" Text='<%#Server.HtmlEncode(Eval("ManufacturerInfo").ToString()) %>'
                                                        Checked="false" />
                                                    <asp:HiddenField ID="hfManufacturerID" runat="server" Value='<%# Eval("ManufacturerID") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="View" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="13%"
                                                ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <a href='ManufacturerDetails.aspx?ManufacturerID=<%# Eval("ManufacturerID") %>'>View</a>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Featured Product" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="cbFeatured" runat="server" Checked="false" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Display order" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <nopCommerce:NumericTextBox runat="server" CssClass="adminInput" Width="50px" ID="txtDisplayOrder"
                                                        Value="1" RequiredErrorMessage="Display order is required" RangeErrorMessage="The value must be from -99999 to 99999"
                                                        MinimumValue="-99999" MaximumValue="99999"></nopCommerce:NumericTextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
                <ajaxToolkit:TabPanel runat="server" ID="pnlRelatedProducts" HeaderText="Related Products">
                    <ContentTemplate>
                        <table class="adminContent">
                            <tr>
                                <td colspan="2" width="100%">
                                    <asp:GridView ID="gvRelatedProducts" runat="server" AutoGenerateColumns="false" Width="100%">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Product" ItemStyle-Width="60%">
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="cbProductInfo2" runat="server" Text='<%# Server.HtmlEncode(Eval("ProductInfo2").ToString()) %>'
                                                        Checked='false' />
                                                    <asp:HiddenField ID="hfProductID2" runat="server" Value='<%# Eval("ProductID2") %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="View" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="20%"
                                                ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <a href='ProductDetails.aspx?ProductID=<%# Eval("ProductID2") %>'>View</a>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Display order" HeaderStyle-HorizontalAlign="Center"
                                                ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <nopCommerce:NumericTextBox runat="server" CssClass="adminInput" Width="50px" ID="txtDisplayOrder"
                                                        Value="1" RequiredErrorMessage="Display order is required" RangeErrorMessage="The value must be from -99999 to 99999"
                                                        MinimumValue="-99999" MaximumValue="99999"></nopCommerce:NumericTextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
               
            </ajaxToolkit:TabContainer>
        </div>
        <table class="adminContent">
            <tr>
                <td align="left" colspan="2">
                    <asp:Button ID="SaveButton" runat="server" Text="Add" CssClass="adminButton" OnClick="SaveButton_Click">
                    </asp:Button>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
